 <style>
.ttl{width:80px;text-align:right;display-inline:block;}
.pop_cont_input{line-height:30px;} .pop_cont_input input{pading:0px 5px;} .pop_cont_input select{height:28px;}
 .pop_cont ul li{width:380px;float:left;}
 </style>
 <div class="pop_cont" style="width:820px;left:30%;">
 <input type="hidden" value="<?php echo $id; ?>" id="editId" />
       <!--title-->
       <h3><?php echo $title;?></h3>
       <!--content-->
       <div class="pop_cont_input">
        <ul>
        
        
         <li>
          <span class="ttl">编号</span>
          <?php echo $info['dveid'];?>
          <input type="hidden" name="e-dveid" id="e-dveid" value="<?php echo $info['dveid'];?>" placeholder="资产编码" class="textbox" style="padding:0px;" />
         </li>
         
               
         <li>
          <span class="ttl">名称</span>
          <input type="text" name="e-dvename" id="e-dvename" value="<?php echo $info['dvename'];?>" placeholder="资产名称" class="textbox" style="padding:0px;" />
         </li>
       
       
        <li>
          <span class="ttl">设备分类</span>
          
       
        <select name="e-first_type" id="e-first_type" class="select firstTypeRS">
	       <option value="">--一级分类--</option>
	       <?php
	       
	       foreach($FirstDepList as $key=>$val)
	   		{
	   		?>
	        <option value="<?php echo $val['id']; ?>" <?php if($val['id']==$info['first_type']){ echo 'selected';} ?> ><?php echo $val['dname'] ?></option>
		   <?php
	       }
       		?>
          </select>
          <select name="e-type" id="e-type" class="select secondTypeRS">
	       <option value="">--二级分类--</option>
	       <?php
	       foreach($SecondDepList as $key=>$val)
	   		{
	   		?>
	        <option value="<?php echo $val['id']; ?>" <?php if($val['id']==$info['type']){ echo 'selected';} ?> ><?php echo $val['dname'] ?></option>
		   <?php
	       }
       		?>
          </select>
          
         </li>
       <li>
          <span class="ttl">品牌</span>
          <input type="text" name="e-brand" id="e-brand" value="<?php echo $info['brand'];?>" placeholder="资产名称" class="textbox" style="padding:0px;" />
         </li>
       
       
        <li>
          <span class="ttl">序列号</span>
          <input type="text" name="e-sn" id="e-sn" value="<?php echo $info['sn'];?>" placeholder="设备生产序列号" class="textbox" style="padding:0px;" />
         </li>
         
         
         <li>
          <span class="ttl">型号</span>
          <input type="text" name="e-model" id="e-model" value="<?php echo $info['model'];?>" placeholder="型号" class="textbox" style="padding:0px;" />
         </li>
         
         
         <li>
          <span class="ttl">位置</span>
          <input type="text" name="e-addr" id="e-addr" value="<?php echo $info['addr'];?>" placeholder="设备位置" class="textbox" style="padding:0px;" />
         </li>
         
         
          <li>
          <span class="ttl">价值</span>
          <input type="text" name="e-price" id="e-price" value="<?php echo $info['price'];?>" placeholder="设备价值" class="textbox" style="padding:0px;" />
         </li>
         
         
        
         
          <li>
          <span class="ttl">数量</span>
           <input type="text" name="e-amount" id="e-amount" value="<?php echo $info['amount'];?>" placeholder="设备数量" class="textbox" style="padding:0px;" />
          
         </li>
         
         <li>
          <span class="ttl">单位</span>
          <input type="text" name="e-unit" id="e-unit" value="<?php echo $info['unit'];?>" placeholder="单位，件、个、台、张" class="textbox" style="padding:0px;" />
         </li>
         
        <li>
          <span class="ttl">属性</span>
          <select name="e-network" id="e-network">
              <option value="0" <?php if($info['network']=='0'){echo 'selected';} ?>>普通资产</option>
              <option value="1"  <?php if($info['network']=='1'){echo 'selected';} ?>>网络设备</option>
          </select>
          
         </li>
         
         <li class="network_type">
          <span class="ttl">IP</span>
          <input type="text" name="e-ip" id="e-ip" value="<?php echo $info['ip'];?>" placeholder="ip地址" class="textbox" style="padding:0px;" />
         </li>
         <li class="network_type">
          <span class="ttl">MAC</span>
          <input type="text" name="e-mac" id="e-mac" value="<?php echo $info['mac'];?>" placeholder="网络设备远程访问密码" class="textbox" style="padding:0px;" />
         </li>
         
         
         
         
         <li>
          <span class="ttl">入库时间</span>
             <?php echo $info['stime'];?>
         </li>
         <li>
          <span class="ttl">入库人</span>
             <?php echo $info['rkUser']['nickname'];?>
         </li>
         
         <li>
          <span class="ttl">变动时间</span>
             <?php echo $info['ltime'];?>
         </li>
         <li>
          <span class="ttl">领用人</span>
             <?php echo $info['useUser']['nickname'];?>
         </li>
           <br style="width:0px;height:0px;clear:both;" />
        </ul>
       </div>
      
       <!--bottom:operate->button-->
       <div class="btm_btn">
        <input type="button" value="确认" class="input_btn trueBtn"/>
        <input type="button" value="关闭" class="input_btn falseBtn"/>
       </div>
      </div>
      
      <script>
      $(function(){
    	  <?php
    			  if($info['network']=='0')
    			  {
    				 ?>
    				 $(".network_type").hide();
    				 <?php
    		      } 
    	  ?>
    	  
     	  $("#e-network").change(function(){
     		  var ty =$(this).val();
     		  if(ty=='0')
     		  {
     			 $(".network_type").hide(); 
     		  }else
     		  {
     			 $(".network_type").show();
     		  }
     	  });
	       $(".trueBtn").unbind().bind("click",function(){
			 
	    	var that =this;
   		    var url="/admin/devlist/editData";
   		    var id=$("#editId").val();
   		    var dveid=$("#e-dveid").val();
   		    var dvename=$("#e-dvename").val();
   		    var first_type=$("#e-first_type").val();
   		    var type=$("#e-type").val();
   		    var brand=$("#e-brand").val();
   		    var sn=$("#e-sn").val();
   		    var model=$("#e-model").val();
   		    var addr=$("#e-addr").val();
   		    var price=$("#e-price").val();
   		    var network=$("#e-network").val();
   		    var price=$("#e-price").val();
   		    var amount=$("#e-amount").val();
   		    var unit=$("#e-unit").val();
   		    var amount=$("#e-amount").val();
   		    //var rpwd=$("#e-rpwd").val();
   		    var mac=$("#e-mac").val();
   		    var ip=$("#e-ip").val();
   		    var rpwd=$("#e-rpwd").val();
   		    
   		    
   		 if(dvename=="")
		    {
		    	ErrTiShi("资产名称不能够为空");return false;
		    }
   		    var param={
   				   id:id,
   				dveid:dveid,
   	   		    dvename:dvename,
   	   		    first_type:first_type,
   	   		    type:type,
   	   		    brand:brand,
   	   		    sn:sn,
   	   		    model:model,
   	   		    addr:addr,
   	   		    price:price,
   	   		    network:network,
   	   		    amount:amount,
   	   		    unit:unit,
   	   		   // rpwd:rpwd,
   	   		    mac:mac,
   	   		    ip:ip,
   				   sys_opt:'editData'//后台判断编辑操作
   		    };
			 AjaxRequest(url,param,function(data){
  			   if(data.err==0)
  			   {
  				   SuccessTiShi("操作成功");
  				   $(".pop_bg").fadeOut();
  				   $(".pop_bg").html('');
  				   myResearch();
  			   }
  			   else
  			   {
  				   ErrTiShi(data.msg);
  			   }
  		   	});
			 
		  });
		   //弹出：取消或关闭按钮
		   $(".falseBtn").unbind().bind("click",function(){
		
			 $(".pop_bg").fadeOut();
		   });
		   
 $(".firstDept").change(function(){
			   
			   var url="/admin/user/selectDeptChange";
	   		    var id=$(this).val();
	   		   
	   		    var param={
	   				   id:id
	   				   
	   		    };
			   AjaxRequest(url,param,function(data){
	  			   if(data.err==0)
	  			   {
	  				   var html='<option value="">--选择--</option>';
	  				   $.each(data.data,function(i,v){
	  					 html +='<option value="'+v.id+'">'+v.depname+'</option>'
	  				   })
	  				   $(".secondDept").html(html);
	  			   }
	  			   else
	  			   {
	  				   ErrTiShi("操作失败");
	  			   }
	  		   	});
			   
		   });
 
 
 $(".firstTypeRS").change(function(){
	   
	   var url="/admin/devlist/selectTypeChange";
		    var id=$(this).val();
		   
		    var param={
				   id:id
				   
		    };
	   AjaxRequest(url,param,function(data){
		   if(data.err==0)
		   {
			   var html='<option value="">--选择--</option>';
			   $.each(data.data,function(i,v){
				 html +='<option value="'+v.id+'">'+v.dname+'</option>'
			   })
			   $(".secondTypeRS").html(html);
		   }
		   else
		   {
			   ErrTiShi("操作失败");
		   }
	   	});
	   
 });

 	});
      </script>